# $Id: Makefile,v 1.26 2004/12/19 17:41:34 sby Exp $

.include "../include/mythbbs.mk"

CFLAGS+= -D_BBS_UTIL_C_ -I$(BBSHOME)/mythbbs/myth

.SUFFIXES: .o .c

.c: 	; $(CCACHE) $(CC) -o $@ $@.c $(CFLAGS) $(LDFLAGS)

TOOL =	bbsmail expire showb mailpost \
	showboard showuser delspam \
	mandex cna bbspost byte findspam \
	delnote rmtrash rmbtrash ktvexpire bbsrf

all: 	$(TOOL)
	@cd fixtool;make all
	@cd statool;make all
	@cd shmtool;make all
	@cd daemon;make all

xchatd: xchatd.c
	$(CC) -o xchatd $(OS_DEF) $(CFLAGS) xchatd.c $(LDFLAGS)

install: $(TOOL)
	install -d $(BBSHOME)/bin/
	install -c -m 755 $(TOOL) $(BBSHOME)/bin/
	@cd fixtool;make install
	@cd statool;make install
	@cd shmtool;make install
	@cd daemon;make install

clean:
	rm -fr $(TOOL) *.o *.BAK *.log *~
	@cd fixtool;make clean
	@cd statool;make clean
	@cd shmtool;make clean
	@cd daemon;make clean

